<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>新的全局常量</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration54.extensions-other.html">扩展中的其他变化</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration54.ini.html">INI 文件处理的变化</a></div>
 <div class="up"><a href="migration54.html">从 PHP 5.3.X 迁移到 PHP 5.4.X</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="migration54.global-constants" class="section">
  <h2 class="title">新的全局常量</h2>

  <p class="simpara">PHP 核心：</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>ENT_DISALLOWED</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>ENT_HTML401</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>ENT_HTML5</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>ENT_SUBSTITUTE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>ENT_XML1</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>ENT_XHTML</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IPPROTO_IP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IPPROTO_IPV6</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IPV6_MULTICAST_HOPS</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IPV6_MULTICAST_IF</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IPV6_MULTICAST_LOOP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IP_MULTICAST_IF</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IP_MULTICAST_LOOP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IP_MULTICAST_TTL</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>MCAST_JOIN_GROUP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>MCAST_LEAVE_GROUP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>MCAST_BLOCK_SOURCE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>MCAST_UNBLOCK_SOURCE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>MCAST_JOIN_SOURCE_GROUP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>MCAST_LEAVE_SOURCE_GROUP</code></strong>
    </span>
   </li>
  </ul>

   <p class="simpara"><a href="book.curl.html" class="link">Curl</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>CURLOPT_MAX_RECV_SPEED_LARGE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>CURLOPT_MAX_SEND_SPEED_LARGE</code></strong>
    </span>
   </li>
   </ul>

  <p class="simpara"><a href="book.libxml.html" class="link">LibXML</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>LIBXML_HTML_NODEFDTD</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>LIBXML_HTML_NOIMPLIED</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>LIBXML_PEDANTIC</code></strong>
    </span>
   </li>
   </ul>

   <p class="simpara"><a href="book.openssl.html" class="link">OpenSSL</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>OPENSSL_CIPHER_AES_128_CBC</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>OPENSSL_CIPHER_AES_192_CBC</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>OPENSSL_CIPHER_AES_256_CBC</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>OPENSSL_RAW_DATA</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>OPENSSL_ZERO_PADDING</code></strong>
    </span>
   </li>
   </ul>

  <p class="simpara"><a href="book.outcontrol.html" class="link">输出缓冲</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_CLEAN</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_CLEANABLE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_DISABLED</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_FINAL</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_FLUSH</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_FLUSHABLE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_REMOVABLE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_STARTED</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_STDFLAGS</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_OUTPUT_HANDLER_WRITE</code></strong>
    </span>
   </li>
   </ul>

   <p class="simpara"><a href="book.session.html" class="link">Sessions</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_SESSION_ACTIVE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_SESSION_DISABLED</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>PHP_SESSION_NONE</code></strong>
    </span>
   </li>
   </ul>

   <p class="simpara"><a href="book.stream.html" class="link">Streams</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>STREAM_META_ACCESS</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>STREAM_META_GROUP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>STREAM_META_GROUP_NAME</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>STREAM_META_OWNER</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>STREAM_META_OWNER_NAME</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>STREAM_META_TOUCH</code></strong>
    </span>
   </li>
   </ul>

   <p class="simpara"><a href="book.zlib.html" class="link">Zlib</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>ZLIB_ENCODING_DEFLATE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>ZLIB_ENCODING_GZIP</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>ZLIB_ENCODING_RAW</code></strong>
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.intl.html" class="link">Intl</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_CHECK_BIDI</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_CHECK_CONTEXTJ</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_NONTRANSITIONAL_TO_ASCII</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_NONTRANSITIONAL_TO_UNICODE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>INTL_IDNA_VARIANT_2003</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>INTL_IDNA_VARIANT_UTS46</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_EMPTY_LABEL</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_LABEL_TOO_LONG</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_DOMAIN_NAME_TOO_LONG</code></strong>
    </span>
   </li>
   <li class="listitem">
   <span class="simpara">
     <strong><code>IDNA_ERROR_LEADING_HYPHEN</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_TRAILING_HYPHEN</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_HYPHEN_3_4</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_LEADING_COMBINING_MARK</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_DISALLOWED</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_PUNYCODE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_LABEL_HAS_DOT</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_INVALID_ACE_LABEL</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_BIDI</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>IDNA_ERROR_CONTEXTJ</code></strong>
    </span>
   </li>
  </ul>

  <p class="simpara"><a href="book.json.html" class="link">Json</a>:</p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code>JSON_PRETTY_PRINT</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>JSON_UNESCAPED_SLASHES</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>JSON_NUMERIC_CHECK</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>JSON_UNESCAPED_UNICODE</code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <strong><code>JSON_BIGINT_AS_STRING</code></strong>
    </span>
   </li>
  </ul>
 </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="migration54.extensions-other.html">扩展中的其他变化</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="migration54.ini.html">INI 文件处理的变化</a></div>
 <div class="up"><a href="migration54.html">从 PHP 5.3.X 迁移到 PHP 5.4.X</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
